package com.xiaren.test;

import java.util.ArrayList;
import java.util.List;

import com.xiaren.util.ReadWriteFile;

public class ReadPrint {
	public static void main(String[] args) {
		 print1();
		 if(1 == 1)
			 return;
			 System.out.println("a");
	}

	static void print1() {
		String str = ReadWriteFile.readFile("d://2.txt");
		String ss = str.trim();
		ss = ss.replaceAll("\r", "").replaceAll("\n", "").replaceAll("\t", "");
		String array[] = ss.split("\\}");
		List<String> list = new ArrayList<String>();
		for (String string : array) {
			int begin = string.indexOf("'");
			int end = string.indexOf("'", begin + 1);
			int begin1 = string.indexOf("'", end + 1);
			int end1 = string.indexOf("'", begin1 + 1);

			String field = string.substring(begin + 1, end);
			String title = string.substring(begin1 + 1, end1);
			// System.out.println("				<td>");
			// System.out.println("					" + title);
			// System.out.println("				</td>");

			System.out
					.println("						<td>\r\n							<s:property value=\"#bean."
							+ field + "\" />\r\n						</td>");

			list.add(string.substring(begin + 1, end));
		}

	}
}
